// Bootstrap Datetimepicker 日期时间

// Base
.datetimepicker {
    width: 265px;
    padding: 10px;
    left: auto;

    @include e-not-rounded {
        border-radius: 0 !important;
    }

    &.datetimepicker-orient-top {
        margin-top: 8px;
    }

    table {
        width: 100%;
    }

    td,
    th {
        width: 35px;
        height: 35px;
        border-radius: 3px;
        font-weight: normal;

        @include e-not-rounded {
            border-radius: 0 !important;
        }
    }

    thead {
        th {
            i {
                font-size: 1.2rem;
            }

            &.prev,
            &.switch,
            &.next {
                color: e-base-color(label, 2);
                font-weight: 500;

                .glyphicon {
                    color: e-base-color(label, 2);
                }

                &:hover {
                    background: e-base-color(grey, 1) !important;
                }
            }

            &.dow {
                font-weight: 500;
                color: e-base-color(label, 3);
            }

            &.next,
            &.prev {
                > span {
                    display: inline-block;
                    font: normal normal normal 16px/1 "LineAwesome";
                    font-size: inherit;
                    text-decoration: inherit;
                    text-rendering: optimizeLegibility;
                    text-transform: none;
                    -moz-osx-font-smoothing: grayscale;
                    -webkit-font-smoothing: antialiased;
                    font-smoothing: antialiased;
                    font-size: 1.2rem;
                }
            }

            &.next {
                > span {
                    &:before {
                        content: "\f112";
                    }
                }
            }

            &.prev {
                > span {
                    &:before {
                        content: "\f111";
                    }
                }
            }
        }
    }

    tbody {
        tr > td {
            transition: $e-transition;

            span {
                color: e-base-color(label, 3);
                transition: $e-transition;

                // 选中
                &.selected,
                &.active {
                    background: e-brand-color(base) !important;
                    color: e-brand-color(inverse) !important;
                }

                &.active:hover,
                &.active.focused {
                    transition: $e-transition;
                    background: lighten(e-brand-color(base), 10%) !important;
                    color: e-brand-color(inverse) !important;
                }
            }

            &.day {
                color: e-base-color(label, 3);

                &:hover {
                    background: e-base-color(grey, 1);
                }

                &.old {
                    color: e-base-color(label, 2);
                }

                &.new {
                    color: e-base-color(label, 3);
                }

                // 当天
                &.today {
                    position: relative;
                    background: rgba(e-state-color(brand, base), .5) !important;
                    color: e-state-color(brand, inverse) !important;

                    &:before {
                        content: '';
                        display: inline-block;
                        border: solid transparent;
                        border-width: 0 0 7px 7px;
                        border-bottom-color: #fff;
                        border-top-color: e-base-color(grey, 2);
                        position: absolute;
                        bottom: 4px;
                        right: 4px;
                    }
                }

                &.range {
                    background: e-base-color(grey, 1);
                }

                // 选中
                &.selected,
                &.active {
                    background: e-brand-color(base) !important;
                    color: e-brand-color(inverse) !important;
                }

                &.active:hover,
                &.active.focused {
                    transition: $e-transition;
                    background: lighten(e-brand-color(base), 10%) !important;
                    color: e-brand-color(inverse) !important;
                }

            }

            // 禁用
            &.disabled {
                color: e-base-color(label, 2) !important;
            }

            span.year,
            span.hour,
            span.minute,
            span.month {
                color: e-base-color(label, 3);

                &.focused,
                &:hover {
                    background: e-base-color(grey, 1);
                }
            }
        }
    }

    tfoot {
        tr > th {
            &.today,
            &.clear {
                @include e-rounded {
                    border-radius: 3px;
                }

                font-weight: 500;

                &:hover {
                    background-color: e-base-color(grey, 1);
                }
            }
        }
    }

    &.datetimepicker-inline {
        border: 1px solid e-base-color(grey, 1);
    }
}

.input-daterange {
    .input-group-addon {
        min-width: 44px;
    }
}